package com.ytc.content.api;

import com.ytc.commons.model.vo.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient("xc-content-service")
public interface ContentClient  {

    //查询所有
    @GetMapping("/coursePub/findAll")
     ResponseResult<List<CoursePubVo>> findAll();
    /*
   根据id查询已发布课程
   */
    @GetMapping("coursePub/{id}")
    ResponseResult<CoursePubVo> findById(@PathVariable("id") Long id);
    /*
     * 根据id查询课程计划
     * GET /{teachplanId}
     * Vo
     * */
    @GetMapping("teachplan/{teachplanId}")
     ResponseResult<TeachplanVo> findPlanById(@PathVariable("teachplanId") Long teachplanId);

    /**
     * 根据课程表id查询课程
     */
    @GetMapping("/{courseBaseId}")
    ResponseResult<CourseVo> findByCourseId(@PathVariable("courseBaseId") Long courseBaseId);
}
